<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .parent img{
            width: 200px;
            height: 200px;
        }
        .parent{
            width: 200px;
            height: 200px;
            margin: 400px auto;
            overflow: hidden;
            position: relative;
        }
        .child{
           width: 200px;
           height: 200px;
           background-color: pink;
           transition: all 2s;
           position: absolute;
           top: 0;
           left: 0;

           transform:rotate(90deg);
           transform-origin: right bottom;

        }
        .parent:hover .child{
            transform:rotate(0deg);
        }
    </style>
</head>
<body>
    <div class="parent">
      <img src="images/user.png" alt="">
      <div class="child">

      </div> 
    </div>
   
</body>
</html>